<?php
/**
 * @date        <!-- phpDesigner :: Timestamp [08-07-2010 00:50:07] -->
 * @filesource  tpl.settings.php
 * @package     WebCms
 * @copyright	Copyright (C) 2010
 * @author      Sérgio 'Horizak' Alves
 */

// Sem acesso directo
defined('_WEXEC') or die('Restricted access');

function tpl_getClass($args) {
  global $cms;

  $div = $args['div'];
  $useBackground = isset($args['useBackground']) ? $args['useBackground'] : true;

  $left = $cms->cfg['site']['lCol'];
  $right = $cms->cfg['site']['rCol'];

  if (!$left and !$right) {
    $return['class']['divBlock'] = 'divBlockNoBackground';
    $return['class']['divCenter'] = 'divCenterNoColumn';
  } elseif (!$left) {
    $return['class']['divBlock'] = 'divBlockNoL';
    $return['class']['divCenter'] = 'divCenterColumn';
  } elseif (!$right) {
    $return['class']['divBlock'] = 'divBlockNoR';
    $return['class']['divCenter'] = 'divCenterColumn';
  } else {
    $return['class']['divBlock'] = '';
    $return['class']['divCenter'] = '';
  }

  if (!$useBackground) $return['class']['divBlock'] = 'divBlockNoBackground';

  if ($div == 'divBlock') {
    return $return['class']['divBlock'];
  } elseif ($div == 'divCenter') {
    return $return['class']['divCenter'];
  }
}
?>